<?php include_partial('common/flashes') ?>
<form id="share-experience-form" action="<?php echo url_for('@share_experience') ?>" method="post">
    <div class="imperative">Share your DocPlus experience with us and others</div>
    <?php echo $form->renderHiddenFields(false) ?>
    <div class="share-experience">
        <div class="experiencer-name-fields">
            <?php include_partial("common/input_field", array("form" => $form, "field" => "name")) ?>
        </div>    
        <div class="experiencer-email-fields">
            <?php include_partial("common/input_field", array("form" => $form, "field" => "email")) ?>
        </div>
    </div>
    <div class="share-experience">
        <div class="share-experience-description">
            <?php include_partial("common/input_field", array("form" => $form, "field" => "description")) ?>
        </div>
    </div>
    <div class="row">
        <ul>
            <li>
                <button id="submit-share-experience" type="submit" class="blue-button-30">Submit</button>
                <input id="done-share-experience" type="button" value="Done" class="brown-button-30">
            </li>
        </ul>
    </div>
    <div class="clear"></div>
</form>
<script type="text/javascript">
    //<![CDATA[
    $(document).ready(function(){
        // make an attempt to submit this form
        $('#submit-share-experience').click(function() {
            $('#share-experience-form').ajaxSubmit(function(data){                 
                $("#share-experience-form-holder").html(data);
            });
            return false;
        });
        
        $("#done-share-experience").click(function(){            
            $.fn.colorbox.close();
        }); 
    });
    //]]>
</script>